/*
 * @(#)PhotoNew.java 0.0.1-SNAPSHOT
 * Copyright Group B
 */

package grupb.upf.XMLObjects.impl;

import javax.swing.ImageIcon;
import java.io.Serializable;

/**
 * <p>This is the class which implments the interface of
 * the Photos of the news.</p>
 *
 * @version    0.0.1-SNAPSHOT
 * @author     Group B
 */
public final class PhotoNew implements grupb.upf.XMLObjects.PhotoNew,
        Serializable {
    /**
     * The serialVersionUID is created to be able to serialize this class, it's
     * necessary because it will be sent.
     */
    private static final long serialVersionUID = 1L;
    /**
     * The url of the photo.
     */
    private String url;
    /**
     * The id of the photo.
     */
    private int id;
    /**
     * The icon of the image.
     */
    private ImageIcon icon;
    /**
     * Method to set the url of the photo.
     * @param urlPhoto the url
     */
    @Override
    public void setUrl(final String urlPhoto) {
        this.url = urlPhoto;
    }

    /**
     * Method to get the url of a photo.
     * @return the url of a photo
     */
    @Override
    public String getUrl() {
        return this.url;
    }

    /**
     * Method to set the id of the photo.
     * @param idPhoto the ID
     */
    @Override
    public void setID(final int idPhoto) {
        this.id = idPhoto;
    }
    /**
     * Method to get the id of a photo.
     * @return the id of a photo
     */
    @Override
    public int getID() {
        return this.id;
    }
    /**
     * Method to set the icon of a photo.
     * @param iconPhoto the icon
     */
    @Override
    public void setIcon(final ImageIcon iconPhoto) {
        this.icon = iconPhoto;
    }

    /**
     * Method to get the icon of a photo.
     * @return the ImageIcon
     */
    @Override
    public ImageIcon getIcon() {
        return this.icon;
    }

}
